# 列表推导式

lst = [ x * x for x in range(1,10)]
print(lst)

# 元组推导式

tup = tuple(x * x for x in range(1,10))
print(tup)

# 字典推导式
dic = { x:x**2 for x in range(1,10)}
print(dic)

# 集合推导式

st = {x for x in range(1,10)}
print(st)

st = [lambda x,i=i: x+i for i in range(10)]
print(st[0](10))




condition_keys_entries = []
condition_values_entries = []

# 假设用户输入了以下内容
condition_keys_entries.insert(0, "equipmentNumber")
condition_values_entries.insert(0, "TA2211080005160024010101")

condition_keys_entries.insert(0, "testFormNumber")
condition_values_entries.insert(0, "ST2024099386")

condition_keys_entries.insert(0, "")  # 空键
condition_values_entries.insert(0, "2409060741K")  # 非空值

cons = {
    key: value 
    for key, value in zip(condition_keys_entries, condition_values_entries) 
    if key and value
}
print(cons)